package com.pzb.goods.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.pzb.goods.mapper.GdGoodsAttributeValueMapper;
import com.pzb.goods.domain.GdGoodsAttributeValue;
import com.pzb.goods.service.IGdGoodsAttributeValueService;

/**
 * 商品属性值Service业务层处理
 * 
 * @author Mr_Wu
 * @date 2021-11-30
 */
@Service
public class GdGoodsAttributeValueServiceImpl implements IGdGoodsAttributeValueService 
{
    @Autowired
    private GdGoodsAttributeValueMapper gdGoodsAttributeValueMapper;

    /**
     * 新增商品属性值
     * 
     * @param gdGoodsAttributeValue 商品属性值
     * @return 结果
     */
    @Override
    public int insertGdGoodsAttributeValue(GdGoodsAttributeValue gdGoodsAttributeValue)
    {
        return gdGoodsAttributeValueMapper.insertGdGoodsAttributeValue(gdGoodsAttributeValue);
    }

    /**
     * 根据商品ID商品属性值信息
     *
     * @param goodsId 商品主键
     * @return 结果
     */
    @Override
    public List<GdGoodsAttributeValue> selectGdGoodsAttributeValueListByGoodsId(Long goodsId) {
        return gdGoodsAttributeValueMapper.selectGdGoodsAttributeValueListByGoodsId(goodsId);
    }

    /**
     * 根据商品ID删除
     *
     * @param goodsId 商品主键
     * @return 结果
     */
    @Override
    public int deleteGdGoodsAttributeValueByGoodsId(Long goodsId) {
        return gdGoodsAttributeValueMapper.deleteGdGoodsAttributeValueByGoodsId(goodsId);
    }
}
